<?php

use Illuminate\Routing\Router;

Admin::registerHelpersRoutes();

Route::group([
    'prefix'        => config('admin.prefix'),
    'namespace'     => Admin::controllerNamespace(),
    'middleware'    => ['web', 'admin'],
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    $router->group(['prefix'=>'dataView'], function (Router $r){
        $r->get('log/{table}/{date?}', 'DataView\LogController@index');

        $r->match(['get', 'post'], 'overviewRealData', 'DataView\OverviewController@realData');
        $r->match(['get', 'post'],'overviewHistoryData','DataView\OverviewController@historyData');

        $r->match(['get', 'post'], 'operationalDataRecharge', 'DataView\OperationController@recharge');
        $r->match(['get', 'post'],'operationalDataOnline','DataView\OperationController@online');
        $r->match(['get', 'post'],'operationalDataRegistered','DataView\OperationController@registered');
        $r->match(['get', 'post'],'operationalDataRetained','DataView\OperationController@retained');
    });
});
